﻿using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class TestCustomScrollRect : MonoBehaviour {

    private VIPScrollRect vipScrollRect;

    public Button button_2;
    public Button button_8;

    public Transform transform_2;
    public Transform transform_8;

    // Use this for initialization
    void Start () {
        vipScrollRect = FindObjectOfType<VIPScrollRect>();
        vipScrollRect.SlideComplete((obj)=> {
            print("停止滑动回调");
        });
        button_2.onClick.AddListener(() =>
        {
            vipScrollRect.Location(transform_2);
        });
        button_8.onClick.AddListener(() =>
        {
            vipScrollRect.Location(transform_8);
        });
    }

}
